<%include file="header.html"/>
<%include file="searchbar.html"/>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0" class="tbspan">
  <tr> 
  <td width="99%" height="476" valign="top">
	<table width="99%" border="0" cellspacing="0" cellpadding="0" style="padding-top:1px">
      <tr> 
        <td width="1%" height="27" align="center" bgcolor="#CEE3E6">&nbsp;</td>
        <td width="3%" align="center" bgcolor="#CEE3E6">&nbsp;</td>
        <td width="96%" bgcolor="#CEE3E6" style="padding-left:5px; padding-top:4px;">当前位置：<a href='/'>主页</a>&gt;<a href='${catnav}'>${cat}</a>&gt;列表 </td>
      </tr>
      <tr> 
        <td height="3" colspan="3" bgcolor="#ECF4F5" style="padding:0px"></td>
      </tr>
    </table>
	<div id="leftmain">
    <table width="100%" height="412" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="220" valign="top">
        <!-- lists entry: id,title,date,username,abstract,category,clicks,comments,subs,osite,uid,aliasid-->
        % for entry in entries:
			%if (entry[11]==0) or (entry[11] and entry[9]=='acfun'):
		<div class="${entry[9]}">
          <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbspan" style="margin-top:6px">
            <tr> 
              <td height="1" colspan="2" background="/static/dot_hor.gif"></td>
			</tr>
			<tr>
			  <td width=20% align=center>
				<a href="/id/${entry[0]}.001"><img src="/thumbs/${entry[0]}" width="109px" height="80px"/></a>
			  </td>
              <td>
				<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbspan">
   	    	     <tr> 
   	        	   <td width="100%">
    	            <b><a href="/id/${entry[0]}.001" class="ulink">${entry[1]}</a></b>
						%if not entry[11]:
						<em>-[${entry[9]}]</em>
						%elif entry[11] and entry[9] == 'acfun':
					<em>-[合体]</em>
					%endif
        	      </td>
        	    </tr>
        		    <tr>
            	  <td height="6"><font color="#8F8C89">&nbsp;日期：${entry[2]} &nbsp;投稿人：<a href="/user/${entry[10]}" target="_blank">${entry[3]}</a> &nbsp;点击：${entry[6]}&nbsp;&nbsp;评论：${entry[7]}&nbsp;&nbsp;弹幕：${entry[8]}</font></td>
            		</tr>
           		 <tr>
           	   <td height="7"><span style="padding-left:3px">${entry[4][:50]}</span></td>
	            </tr>
				</table>
			  </td>
			  <td width=15% align=center>
				%if entry[10] >= 100:
					<a href="/user/${entry[10]}"><img src="/icon/${entry[10]}" height="50px"/></a><br>
				%else:
					<a href="/user/${entry[10]}"><img src="/icon/00${entry[10]}" height="50px"/></a><br>
				%endif
				<a href="/user/${entry[10]}">${entry[3]}</a>
			  </td>
			</tr>
          </table>
		</div> <!-- end of osite div -->
			%endif
        % endfor
        <!-- end of lists-->
        </td>
      </tr>
    </table> 
	</div> <!-- leftmain -->
	<!-- hide the contents from bilibili -->
	<script>
		/*var lmnum;
		$.ajax({ url : "/checkpri/"+Math.ceil(999999*Math.random()), 
				success: function(data){
   	  			if (parseFloat(data)<100) {
					$(".acfun").show();
					$(".avfun").show();
					lmnum = $(".acfun").length + $(".avfun").length;
				}else {
					$(".acfun").show();
					$(".avfun").show();
					$(".bilibili").show();
					lmnum = $(".acfun").length + $(".avfun").length + $(".bilibili").length;
				}},
				async : false
		 });
		*/
	</script>	
	<!-- -->
    <table width="100%" border="0" cellpadding="1" cellspacing="1">
      <tr> 
        <!-- nav pages -->
        <td height="25" align="center"> 共${pages}页/${records}条记录 &nbsp;
        % if cur != 1:
          <a href="1">首页</a>
          <a href="${prev}">上一页</a>
        % endif
        % for p in navs:
          % if p == cur:
            ${p}
          % else:
            <a href="${p}">[${p}]</a>
          % endif
        % endfor
        % if cur != last:
          <a href="${next}">下一页</a>
          <a href="${last}">末页</a>
        % endif
          <select name='sldd' style='width:78' onchange='location.href=this.options[this.selectedIndex].value;'>
            % for p in xrange(1,pages+1):
              % if p == cur:
                <option value='${p}' selected>${p}</option>
              % else:
                <option value='${p}'>${p}</option>
              % endif
            % endfor
          </select>
        </td>
        <!-- nav pages -->
      </tr>
    </table>
  </td>
  <td width="7" valign="top"></td>
  <td width="196" valign="top">
	  <table width="100%" border="0" cellspacing="0" cellpadding="0">

      </table>
	  <table width="99%" border="0" cellspacing="0" cellpadding="0" style="padding-top:1px">
        <tr>
          <td width="1%" height="27" align="center" bgcolor="#CEE3E6">&nbsp;</td>
          <td width="99%" bgcolor="#CEE3E6" style="padding-left:5px; padding-top:4px;">·热门排行</td>
        </tr>
        <tr>
          <td height="3" colspan="3" bgcolor="#ECF4F5" style="padding:0px"></td>

        </tr>
      </table>
	<div id="righttop" style="overflow:hidden;height:0px;">
	  <table width="100%" border="0">
        <tr>
          <td>
            <!-- tops url,title,clicks-->
          % for top in tops:
            <table width="278" border="0" cellspacing="0" cellpadding="0"  class="t1">
			  <tr>
                <td height="3" colspan="2"></td>
                </tr>
              <tr>
                <td height="1" colspan="3" background="/static/dot_hor.gif"></td>
              </tr>
              <tr>
                <td width="100%">&nbsp;<a href='/id/${top[0]}.001'>${top[1]}</a></td>
              </tr>
              <tr>
                <td width="100%" height="13"><font color="#8F8C89">&nbsp;&nbsp;点击：${top[2]}</font></td>
              </tr>

              <tr>
                <td height="3" colspan="2"></td>
                </tr>
            </table>
          % endfor
            <!-- end of tops -->
          </td>
        </tr>
      </table>
	</div> <!-- righttop -->
	<script>
		$("#righttop").height( lmnum*90 );
	</script>
    </td>
  </tr>
</table>
<%include file="footer.html"/>
